home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9123 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  980 b 

  1. Path: brtph500.bnr.ca!oophelp
  2. From: oophelp@bnr.ca (OOP Helpline)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Class problem
  5. Date: 28 Feb 1996 19:55:40 GMT
  6. Organization: Bell Northern Research
  7. Message-ID: <4h2bvs$pop@brtph500.bnr.ca>
  8. References: <4gv6j2$klv@news-e2b.gnn.com>
  9. NNTP-Posting-Host: brtph89d.bnr.ca
  10. Originator: oophelp@brtph89d
  11.  
  12.  
  13. |>                 class addr_data:public name_data
  14. |>                 {
  15. |>                  public:
  16. |>                      char street[25];
  17. |>                      char city[15];
  18. |>                      char state[3];
  19. |>                      int zip[11];
  20. |>                      int phone[10];
  21. |>                  }addr;
  22. |> 
  23. |> Can someone please tell me what is wrong with this picture?  I 
  24. |> appreciate it.
  25.  
  26. I see at least a half a dozen conceptual problems, such as improper
  27. inheritance, lack of encapsulation, lack of aggregation...
  28.  
  29. Just because you can get your C++ code to compile or even to run does
  30. not mean you are doing it right.
  31.